/*************************************************************************
 * @file: solid.h
 * @date: 01/04/2012
 * TOPOL v1_0 - (c)copyright 2012 TEC/UFF
 *************************************************************************
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 ************************************************************************/

#ifndef _SOLID
#define _SOLID

// includes
//----------

// forward declarations
//----------------------
class Face;
class Edge;
class Vertex;


/*!
 * CLASS
 * Solid
 * 
 * This class implements the requirement for the topological entity named
 * Solid and sets all the necessary adjacency informations
 * 
 * @author Andre Pereira (andremaues@id.uff.br)
 * @version 1.0.0
 * @see Face
 * @see Edge
 * @see Vertex
 */
class Solid
{

public:

  ////////////////////////////////////////////////
  ///  Constructor and Destructor Declaration  ///
  ////////////////////////////////////////////////

  /**
   * @brief Constructs a solid and add it at the end of the list of solids
   * @param _first is the first Solid object in the list
   */
	Solid( Solid* _first );

  ////////////////////////////////////
  ///  PUBLIC Methods Declaration  ///
  ////////////////////////////////////
		
  /**
   * @brief Gets the solid identity
   * @return size_t with the solid identity
   */
  size_t getSolidno();

  /**
   * @brief Gets the next solid
   * @return Solid* pointer to the next solid object
   */
  Solid* getNexts();

  /**
   * @brief Gets a face from the list of solid faces
   * @return Face* pointer to an element of the list of faces
   */
	Face* getFace();	

  /**
   * @brief Gets an edge from the list of solid edges
   * @return Edge* pointer to an element of the list of edges
   */
	Edge* getEdge();

  /**
   * @brief Gets a vertex from the list of solid vertexes
   * @return Vertex* pointer to an element of the list of vertexes
   */
	Vertex* getVertex();

  /**
   * @brief Sets an identity for the solid
   * @param _s the solid identity
   */
  void setSolidno( size_t _s );

  /**
   * @brief Sets a face to the list of solid faces
   * @param _face is a face of the solid that will be stored in the list of faces
   */
	void setFace( Face* _face );	

  /**
   * @brief Sets an edge to the list of solid edges
   * @param _edge is an edge of the solid that will be stored in the list of edges
   */
  void setEdge( Edge* _edge );	

  /**
   * @brief Sets a vertex to the list of solid vertexes
   * @param _vertex is a vertex of the solid that will be stored in the list of vertexes
   */
  void setVertex( Vertex* _vertex );	


private:

  ////////////////////////////////
  ///  Attributes Declaration  ///
  ////////////////////////////////

  /** @brief Identification of the solid, i.e., the solid identity */
	size_t m_solidno;

  /** @brief Pointer to the previous solid */
	Solid* m_prevs;

  /** @brief Pointer to the next solid */
	Solid* m_nexts;

  /** @brief Pointer to the list of faces */
	Face* m_sfaces;

  /** @brief Pointer to the list of edges */
  Edge* m_sedges;

  /** @brief Pointer to the list of vertexes */
	Vertex* m_sverts;

};

#endif
